package tianrun.ziguan.api.calculate.config.constant;

import com.baomidou.mybatisplus.core.toolkit.StringPool;

public class StringPools implements StringPool {

    public static final String LOGIN_TOKEN = "loginToken";
    public static final String DEFAULT_MESSAGE_ERROR = "ERROR";
    public static final String LAST_SQL = "limit 1";
    public static final String STOP_SIGN = "、";
    public static final String DEAL = "李虹均";
    public static final String VALID = "is_valid";
    public static final String TEMPLATE_ID = "template_id";
    public static final String CAL_ASSET_ID = "cal_asset_id";
    public static final String STATIC_DATA = "STATICDATA";

    /**
     * 响应信息
     */
    public static final String STR_RESPONSE_SUCCESS = "1000";
    public static final String OLD_EAM_SUCCESS_CODE = "1";
    public static final String STR_OK = "OK";

    private StringPools() {
    }

    /**
     * 数据状态:0删除,1有效
     */
    public enum Valid {
        valid("1"),//有效
        invalid("0"),//无效
        delete("0");//删除

        public final String val;

        Valid(String s) {
            this.val = s;
        }

        public static Valid match(String s) {
            if (s == null) {
                return null;
            }
            for (Valid value : values()) {
                if (value.name().equalsIgnoreCase(s) || value.val.equalsIgnoreCase(s)) {
                    return value;
                }
            }
            return null;
        }
    }
}
